<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码设置</title>
<jsp:include page="/common.jsp" />
<script type="text/javascript">
	$(document).ready(function(){
		$("#btnSubmit").click(function(){
			var options = { 
					url:"${pageContext.request.contextPath}/system/user/resetPassword.htm",
					onSubmit:function(){return validateRequiredFields($("#passForm")[0]);},
		            success:function(data) { 
		            	switch(data){
		            	case "0":
		            		$.messager.alert("提示","原密码不正确.","error");
		            		break;
		            	case "1":
		            		$.messager.alert("提示","两次密码不匹配.","error");
		            		break;
		            	case "2":
		            		$.messager.alert("提示","原密码与新密码不能相同.","error");
		            		break;
		            	case "3":
		            		$.messager.alert("提示","密码重设成功!","info",function(){$("#passForm")[0].reset();});
		            		break;
		            	}
		            } 
		        };
			$("#passForm").form(options);
			$("#passForm").submit();
		});
		
	});
</script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/resource/form.css">
</head>
<body>
	<form id="passForm" method="post">
		<table>
			<tr>
				<td >原始密码</td>
				<td><input type="password" name="passWord"
					value="${userFormBean.passWord }" alt="原始密码#true"/> <span class="required">*</span></td>
			</tr>
			<tr>
				<td>新密码</td>
				<td><input type="password" name="newPassWord"
					value="${userFormBean.newPassWord }" alt="新密码#true"/> <span class="required">*</span></td>
			</tr>
			<tr>
				<td>重复密码</td>
				<td><input type="password" name="repeatPassWord"
					value="${userFormBean.repeatPassWord}" alt="重复密码#true"/> <span class="required">*</span></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td ><input type="button" id="btnSubmit" value="提交" />&nbsp;<input
					type="reset" value="重置" /></td>
			</tr>
		</table>
	</form>

</body>
</html>